<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>XPM2 SMTP::delivery()</title>
<style>
body, pre {
	font-family: Verdana;
	font-size: 10pt;
}
</style>
</head>
<body bgcolor="#f1f3f5" topmargin="10" leftmargin="14">

<pre>
SMTP :: <i>boolean</i> <b>delivery</b> ( <i>string</i> server_connection_type )
<hr>
Returns TRUE if the server connection type has been successfully set, FALSE if not.

<b>local</b> - use mail() function from php (with mail settings from php.ini), and if fail, will send e-mail to 127.0.0.1 (localhost)
<b>client</b> - send the e-mail directly to the client (MX zone) mail server
<b>relay</b> - use a relay mail server to send the e-mail

<i>string</i> server_connection_type possible values are: <b>local</b>, <b>client</b>, <b>relay</b>, and including combinations with this three values separated by middle line.
If you write multiple connections separated by middle line, second connection (afther middle line), will be used only if previous connection has fail.

Example:
<table border="0" bgcolor="white">
<tr><td>
<pre><code>
$mail = new SMTP;

$mail->Delivery('local-relay-client');

// if use relay, then you must set the relay connection parameters

$mail->Relay('relay.host.net', 'username', 'password');

$mail->AddTo('client_username@destination.net');
</code></pre>
</td></tr>
</table>

Example how to send an e-mail directly to localhost without autentication:
<table border="0" bgcolor="white">
<tr><td>
<pre><code>
$mail = new SMTP;

$mail->Delivery('relay');

$mail->Relay('127.0.0.1');
</code></pre>
</td></tr>
</table>

<hr color="white">

[ <a style="color: blue; text-decoration: none" href="mailto:expertphp@gmail.com?subject=XPM2 Comment SMTP Delivery">Comments</a> ]

Last update: Saturday, July 15, 2006

</pre>

</body>
</html>